package com.example.myapplication;

import androidx.annotation.NonNull;

import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

public class MergeOperatorDemo {
    Observer<Object> onComplete = new Observer<Object>() {
        @Override
        public void onSubscribe(@NonNull Disposable d) {
            System.out.println("onSubscribe....");
        }

        @Override
        public void onNext(@NonNull Object o) {
            System.out.println("onNext...." + o.toString());
        }

        @Override
        public void onError(@NonNull Throwable e) {
            System.out.println("onError" + e.toString());
        }

        @Override
        public void onComplete() {
            System.out.println("onComplete");
        }
    };
    public void zuhe(){
        Observable.concat(Observable.just("1111"),
                Observable.just("22")).subscribe(onComplete);

    }
}
